package com.zt.business.service;

import com.zt.model.util.DBUtil;
import org.apache.ibatis.session.SqlSession;

public class BaseSerivce<T> {
    protected T mapper=null;
    protected SqlSession sqlSession=null;

    /**
     * 获取mapper，sqlSession
     */
    public void instance(Class<T> clazz){
        sqlSession = DBUtil.getFactory().openSession();
        mapper = sqlSession.getMapper(clazz);
    }
}
